package ncku.account.unitTest;

import static org.junit.Assert.assertEquals;
import ncku.account.data.AbstractSubTransaction;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class AbstractSubTransactionTest {
	AbstractSubTransaction ast;
       
	@Before
    public void setUp(){
		ast = new AbstractSubTransaction("Test",1000);
    }
	@After
    public void tearDown(){
		ast = null;
    }
    @Test
    public void test(){
    	
    	//test getSubAmount
    	assertEquals(1000,ast.getSubAmount());
    	
    	//test getSubStringAmount
    	assertEquals(Integer.toString(1000),ast.getSubStringAmount());
    	
    	//test getSubDescription
    	assertEquals("Test",ast.getSubDescription());
    	
    	//test setSubAmount
    	ast.setSubAmount(1001);
    	assertEquals(1001,ast.getSubAmount());
    	
    }

}